<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?><div class ="row-fluid">
    <div class="span4 well"> 
        <h4>Accounts managed by me</h4>
        <?php if (!empty($accountsArrayManager)) { ?>
            <table>
                <tr>

                    <th>Name</th>
                    <th>Actions</th>

                    <?php for ($i = 0; $i < count($accountsArrayManager); $i++) { ?>
                    <tr>

                        <td width="30"><?php echo $this->Html->image($accountsArrayManager[$i]['Account']['image']) . ' &nbsp;&nbsp;  ' . $accountsArrayManager[$i]['Account']['screen_name'] ?></td>
                        <td width="20"><?php echo $this->Html->link('Delete', array('action' => 'deleteTwitterAccount', $accountsArrayManager[$i]['Account']['id']), array(), "Are you sure you want to delete this account ?") ?>
                            <?php
                            echo $this->Html->link('Edit', array('controller' => 'Account', 'action' => 'edit', $accountsArrayManager[$i]['Account']['id']))
                            . " " . $this->Html->link('Reactivate', array('controller' => 'tattlraccounts', 'action' => 'reactivate', $accountsArrayManager[$i]['Account']['id'])) . " ";
                            if (isset($account)) {
                                if ($account == $accountsArrayManager[$i]['Account']['id']) {
                                    echo $this->Html->link($limit, array('controller' => 'tattlraccounts', 'action' => 'checkLimit', $accountsArrayManager[$i]['Account']['id']));
                                } else {
                                    echo $this->Html->link('Check Limit', array('controller' => 'tattlraccounts', 'action' => 'checkLimit', $accountsArrayManager[$i]['Account']['id']));
                                }
                            } else {
                                echo $this->Html->link('Check Limit', array('controller' => 'tattlraccounts', 'action' => 'checkLimit', $accountsArrayManager[$i]['Account']['id']));
                            }
                            ?></td>

                    </tr>
                <?php } ?>
            </table>
        <?php } else { ?>
            <h4>You are not managing any accounts at the moment</h4>
        <?php } ?>


    </div>
    <div class="span4 well"> 
        <h4>Accounts moderated by me</h4>
        <?php if (!empty($accountsArrayModerator)) { ?>
            <table>
                <tr>
                    <th>Name</th>
                    <th>Actions</th>

                    <?php for ($i = 0; $i < count($accountsArrayModerator); $i++) { ?>
                    <tr>

                        <td width="30"><?php echo $this->Html->image($accountsArrayModerator[$i]['Account']['image']) . ' &nbsp;&nbsp;  ' . $accountsArrayModerator[$i]['Account']['screen_name'] ?></td>
                        <td width="20"><?php echo $this->Html->link('Resign', array('action' => 'Resign', $accountsArrayModerator[$i]['Account']['id']), array(), "Are you sure you want to resign from this account ?") ?>
                        </td>

                    </tr>
                <?php } ?>
            </table>
        <?php } else { ?>
            <h4>You are not moderating any accounts at the moment</h4>
        <?php } ?>
    </div>
    <div class="span4 well">
        <h4>Accounts edited by me</h4>
        <?php if (!empty($accountsArrayEditor)) { ?>
            <table>
                <tr>
                    <th>Name</th>
                    <th>Actions</th>

                    <?php for ($i = 0; $i < count($accountsArrayEditor); $i++) { ?>
                    <tr>

                        <td width="30"><?php echo $this->Html->image($accountsArrayEditor[$i]['Account']['image']) . ' &nbsp;&nbsp;  ' . $accountsArrayEditor[$i]['Account']['screen_name'] ?></td>
                        <td width="20"><?php echo $this->Html->link('Resign', array('action' => 'Resign', $accountsArrayEditor[$i]['Account']['id']), array(), "Are you sure you want to Resign from this account ?") ?>
                        </td>

                    </tr>
                <?php } ?>
            </table>
        <?php } else { ?>
            <h4>You are not editing any accounts at the moment</h4>
        <?php } ?>
    </div>
</div>

